const mongoose = require('mongoose');

const attractionSchema = new mongoose.Schema({
  name: {
    type: String,
    required: true
  },
  destination: {
    type: mongoose.Schema.Types.ObjectId,
    ref: 'Destination',
    required: true
  },
  description: {
    type: String,
    required: true
  },
  image: {
    type: String,
    required: true
  },
  coordinates: {
    lat: Number,
    lng: Number
  },
  rating: {
    type: Number,
    min: 0,
    max: 5,
    default: 4.0
  },
  price: {
    type: String,
    default: '免费'
  },
  openTime: {
    type: String,
    default: '全天'
  },
  tags: [String]
}, {
  timestamps: true
});

module.exports = mongoose.model('Attraction', attractionSchema); 